package com.felight.ems.exceptions;

class ExceptionEx{
	public static void main(String[] args){
		int i=1,j=0;
		int[] array=new int[10];
		String str="A";
		
		try{
			int result=i/j;
			int lastele=array[11];
			double x=Double.parseDouble(str);
			System.out.println("the number is:"+ x);
		}
		catch(ArithmeticException ex){
			System.out.println("Divide by zero is invalid");
		}
		catch(ArrayIndexOutOfBoundsException e){
			System.out.println("out of bound element cannot be accessed");
		}
		catch(NumberFormatException e){
			System.out.println("number entered is not legal");
		}
		catch(Exception ex){
			System.out.println("Exception");
		}
		
	}
	
}